import service from "@/utils/request";

export function useTaskInsertApi(data: any){
    return service.post("/project/task", data)
}
export function useTaskUpdateApi(data: any){
    return service.put("/project/task", data)
}

export function useTaskAssociationDriverApi(id: number | string){
    return service.get("/project/taskCar/select", {
        params: {
            taskId: id
        }
    })
}
export function useTaskCarInsertApi(id: string){
    return service.delete("/project/taskCar/"+ id)
}
export function useTaskWayBillApi(data:any){
    return service.post("/project/waybill", data)
}

export function useTaskDetailsApi(id: number | string){
    return service.get("/project/task/info/"+id)
}

export function useTaskWayBillInfoApi(id: number | string){
    return service.get("/project/waybill/info/" + id)
}

export function useTaskEndApi(id: string){
    return service.put("/project/task/over", {
        id: id
    })
}
export function useTaskWayBillSettlementApi(id: string){
    return service.put("/project/waybill/settle/" + id)
}
export function useTaskWayBillAbandonApi(id: string){
    return service.put("/project/waybill/abandon/" + id)
}
